﻿Public Class BtnSoal
    Property value As String
    Property color As String
    Property jawab As String
    Property status As Boolean = False
    Property statusColor As Boolean = False
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        For Each j As Object In Form.ActiveForm.Controls
            If TypeOf j Is level2 Then
                j.resetColor()
                j.color = color
            End If
        Next
        'Else
        If status = False Then
            Button1.BackColor = System.Drawing.Color.FromName(color) 
        End If
        'status = True
        'End If
        statusColor = True
    End Sub

    Sub refreshText(ByVal text As String)
        Button1.Text = text
        value = text
    End Sub
    Sub resetColor()
        Button1.BackColor = Drawing.Color.Empty
        statusColor = False
    End Sub
End Class
